<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!-- dwr -->
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/util.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/engine.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/interface/MessagePush.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/dwr/interface/UpdatePageInfo.js"></script>
<!-- jquery -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery-1.8.0.min.js"></script>
<!-- easyui -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/easyui/locale/easyui-lang-zh_CN.js"></script>
<!-- 自定义公共函数 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/utils.js"></script>
<!-- 一些公共常量 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/constants.js"></script>
<!-- 拼音搜索 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/combogrid_select.js"></script>
<!-- highcharts -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/highcharts/highcharts.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/highcharts/modules/exporting.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/highcharts/highcharts-more.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/highcharts/modules/data.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/highcharts/modules/funnel.js"></script>
<!-- my97 -->
<script type="text/javascript" src="${pageContext.request.contextPath}/js/My97DatePicker/WdatePicker.js"></script>
<!-- easyui css -->
<link id="easyuiTheme" rel="stylesheet" href="${pageContext.request.contextPath}/js/easyui/themes/<c:out value="${userSession.puserExtend.uitheme }" default="default"/>/easyui.css" type="text/css"></link>
<link rel="stylesheet" href="${pageContext.request.contextPath}/js/easyui/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" type="text/css"></link>
<!-- 自定义icons -->
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/icon.css" type="text/css"></link>
<script type="text/javascript">
	//提示消息
	function showMessage(msg) {
		var msgJson = $.parseJSON(msg);
		receiveMsgFromUser(msgJson);
	}
	//更新在线人数
	function reloadOnlineUser(num) {
		$("#layout-south-online-num").html(num);
	}
	
	//用户未登录
	function noSession() {
		//未登录
		if (null == '${userSession.id}' || '' == $.trim('${userSession.id}')) {
			$.messager.alert('错误', '请登录后再进行操作！', '', function() {
				window.location.reload();
			});
		}
	}
	
	function showSysMsg(msg, fn) {
		if(fn) {
			$.messager.alert('信息', msg, '', function() {
				eval(fn);
			});
		} else {
			$.messager.alert('信息', msg, '');
		}
	}
	
	//初始化dwr
	function initDwr() {
		//dwr
		dwr.engine.setActiveReverseAjax(true);
		dwr.engine.setNotifyServerOnPageUnload(true);
		//初始化session监控
		MessagePush.onPageLoad();
		UpdatePageInfo.getUsersInfo();
	}

	$(function() {
		//项目路径赋值
		ContextPath = "${pageContext.request.contextPath}";
		initDwr();
	});

</script>